/*
 */

package com.railway.files.model;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
import org.hibernate.validator.constraints.Length;

import cn.org.rapid_framework.util.DateConvertUtils;

import com.railway.common.base.BaseEntity;

/**
 * @author  jiangcheng
 * @version 1.0
 * @since 1.0
 */


public class Files extends BaseEntity implements java.io.Serializable {
//	private String maintainernames = null;
//    private String maintainerid = null;
//    private String checkernames = null;
//    private String checkerid = null;
//    private String visitornames = null;
//    private String visitorid = null;



	private static final long serialVersionUID = 5454155825314635342L;
	private java.lang.String  uploadedfileid = null;
	//date formats
	public static final String FORMAT_CREATE_TIME = DATE_FORMAT;
	
	//可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息
	//columns START
	@Length(max=32)
	private java.lang.String id;
	@Length(max=500)
	private java.lang.String fileImg= null;
	@Length(max=500)
	private java.lang.String ctxpaths= null;
//	CTXPATHS    
	@Length(max=32)
	private java.lang.String objId;
	@Length(max=10)
	private java.lang.String fileTypes;
	@Length(max=200)
	private java.lang.String names;
	@Length(max=500)
	private java.lang.String paths;
	@Length(max=100)
	private java.lang.String fileType;
	@Length(max=500)
	private java.lang.String memo;
	private java.lang.String filesize = null;
	//分类名
	private java.lang.String catname;
	private Integer orderNo;
	private String createTimeString = null;
	private Long state;
	@Length(max=32)
	private java.lang.String creator;
	
	private java.util.Date createTime;
	//columns END

	public Files(){
	}

	public Files(
		java.lang.String id
	){
		this.id = id;
	}

	public void setId(java.lang.String value) {
		this.id = value;
	}
	
	public java.lang.String getId() {
		return this.id;
	}
	public void setObjId(java.lang.String value) {
		this.objId = value;
	}
	
	public java.lang.String getObjId() {
		return this.objId;
	}
	public void setFileTypes(java.lang.String value) {
		this.fileTypes = value;
	}
	
	public java.lang.String getFileTypes() {
		return this.fileTypes;
	}
	public void setNames(java.lang.String value) {
		this.names = value;
	}
	
	public java.lang.String getNames() {
		return this.names;
	}
	public void setPaths(java.lang.String value) {
		this.paths = value;
	}
	
	public java.lang.String getPaths() {
		return this.paths;
	}
	public void setFileType(java.lang.String value) {
		this.fileType = value;
	}
	
	public java.lang.String getFileType() {
		return this.fileType;
	}
	public void setMemo(java.lang.String value) {
		this.memo = value;
	}
	
	public java.lang.String getMemo() {
		return this.memo;
	}
	public void setOrderNo(Integer value) {
		this.orderNo = value;
	}
	
	public Integer getOrderNo() {
		return this.orderNo;
	}
	public void setState(Long value) {
		this.state = value;
	}
	
	public Long getState() {
		return this.state;
	}
	public void setCreator(java.lang.String value) {
		this.creator = value;
	}
	
	public java.lang.String getCreator() {
		return this.creator;
	}
	public String getCreateTimeString() {
		return DateConvertUtils.format(getCreateTime(), FORMAT_CREATE_TIME);
	}
	public void setCreateTimeString(String value) {
		this.createTimeString = value;
	//	setCreateTime(DateConvertUtils.parse(value, FORMAT_CREATE_TIME,java.util.Date.class));
	}
	
	public void setCreateTime(java.util.Date value) {
		this.createTime = value;
	}
	
	public java.util.Date getCreateTime() {
		return this.createTime;
	}

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("Id",getId())
			.append("ObjId",getObjId())
			.append("FileTypes",getFileTypes())
			.append("Names",getNames())
			.append("Paths",getPaths())
			.append("FileType",getFileType())
			.append("Memo",getMemo())
			.append("OrderNo",getOrderNo())
			.append("State",getState())
			.append("Creator",getCreator())
			.append("CreateTime",getCreateTime())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof Files == false) return false;
		if(this == obj) return true;
		Files other = (Files)obj;
		return new EqualsBuilder()
			.append(getId(),other.getId())
			.isEquals();
	}

	public java.lang.String getUploadedfileid() {
		return uploadedfileid;
	}

	public void setUploadedfileid(java.lang.String uploadedfileid) {
		this.uploadedfileid = uploadedfileid;
	}

	public java.lang.String getCatname() {
		return catname;
	}

	public void setCatname(java.lang.String catname) {
		this.catname = catname;
	}

	public java.lang.String getFileImg() {
		return fileImg;
	}

	public void setFileImg(java.lang.String fileImg) {
		this.fileImg = fileImg;
	}

	public java.lang.String getCtxpaths() {
		return ctxpaths;
	}

	public void setCtxpaths(java.lang.String ctxpaths) {
		this.ctxpaths = ctxpaths;
	}

	public java.lang.String getFilesize() {
		return filesize;
	}

	public void setFilesize(java.lang.String filesize) {
		this.filesize = filesize;
	}
}

